//
//  CCNetworkTool.swift
//  01-新浪微博666
//
//  Created by 陈冲 on 15/11/26.
//  Copyright © 2015年 itcast. All rights reserved.
//

import UIKit

import AFNetworking

///网络单例
class CCNetworkTool: AFHTTPSessionManager {
    
    //单例
    static let sharedInstance: CCNetworkTool = {
        // baseURL
        let baseURL = NSURL(string: "https://api.weibo.com/")
        let tool = CCNetworkTool(baseURL: baseURL)
        
        // 添加响应的序列化器
        tool.responseSerializer.acceptableContentTypes?.insert("text/plain")
        
        return tool
        }()
    
}
